//
//  HMSportMainViewController.m
//  HMSport
//
//  Created by apple on 2017/4/21.
//  Copyright © 2017年 itheima. All rights reserved.
//

#import "HMSportMainViewController.h"
#import "HMSportControlController.h"
#import "HMSportTrack.h"

@interface HMSportMainViewController ()

@end

@implementation HMSportMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

//点击运动按钮
- (IBAction)clickSportBtn:(UIButton *)sender {
    //创建运动轨迹模型
    HMSportTrack *track = [[HMSportTrack alloc] initWithSportType:sender.tag withSportState:HMSportStateContinue];
    
    //创建轨迹控制器
    HMSportControlController *trackVc = [[HMSportControlController alloc] init];
    trackVc.track = track;
    [self presentViewController:trackVc animated:YES completion:nil];
    
}


@end
